The present invention relates to the preparation of quaternary ammonium salts. These are generally prepared by the alkylation of tertiary amines with alkyl halides, sulfonates or sulfates according to the following reaction. ##STR1## where X=Cl, Br, I, R"SO.sub.4.sup.-, R"SO.sub.3
These reactions are limited by the availability of the alkylating agents and in the counter ion which is generated. For example, alkyl phosphates are not readily available, making it difficult to produce a quaternary ammonium phosphate.
Another method for producing quaternary ammonium sulfates involves the reaction of tertiary amines with ethylenimine in the presence of acid. This reaction results in the following type of quaternary ammonium compound: ##STR2## The counter ion "X.sup.- " can be varied as a function of the acid used. These types of quaternary ammonium compounds are useful as antistatic agents and in the dying of acrylic fabrics.